package com.cunjin.menu.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cunjin.menu.dto.MenuDTO;
import com.cunjin.menu.service.MenuService;

@Controller
@RequestMapping("/menu")
public class MenuController {
	
	
	@Autowired
	private MenuService service;
	
	
	@ResponseBody
	@RequestMapping("/initTree")
	public List<MenuDTO> initTree(Integer id){
		return service.initTree(id);
	}
}
